package com.tsd.jxc.stock.service;

import com.tsd.core.vo.PageBean;
import com.tsd.jxc.stock.entity.JxcStockInventoryExt;
import com.tsd.jxc.stock.entity.JxcStockInventoryItem;
import com.tsd.jxc.stock.entity.JxcStockInventoryItemExt;
import com.tsd.system.entity.SysUser;
import com.tsd.system.entity.SysUserExt;

import java.util.List;
import java.util.Map;

/**
 * 描述：JxcStockInventoryItem服务实现层接口
 *
 * @author Hillpool
 * @date 2022/07/29 15:06:33
 */
public interface JxcStockInventoryItemService {

    /**
     * 描述：根据id获取JxcStockInventoryItem
     *
     * @param id
     */
    JxcStockInventoryItem getJxcStockInventoryItemById(Long id) throws Exception;

    /**
     * 描述：根据sid获取JxcStockInventoryItem
     *
     * @param sid
     */
    JxcStockInventoryItemExt queryBySid(String sid) throws Exception;

    List<JxcStockInventoryItemExt> queryByInventoryList(List<String> inventory_list) throws Exception;

    /**
     * 描述：根据sid列表删除JxcStockInventoryItem
     *
     * @param list
     */
    void deleteJxcStockInventoryItems(List<String> list, SysUser opUser) throws Exception;

    /**
     * 描述：保存或更新JxcStockInventoryItem
     *
     * @param record
     * @param opUser
     */
    void saveJxcStockInventoryItem(JxcStockInventoryItem record, SysUser opUser) throws Exception;

    void batchSaveJxcStockInventoryItem(List<JxcStockInventoryItemExt> list, SysUserExt opUser) throws Exception;

    /**
     * 描述：根据params分页查询JxcStockInventoryItem
     *
     * @param params
     * @param page
     */
    List<JxcStockInventoryItemExt> findJxcStockInventoryItems(Map<String, Object> params, PageBean page) throws Exception;

    /**
     * 描述：根据params分页查询JxcStockInventoryItem
     *
     * @param params
     */
    List<JxcStockInventoryItemExt> findJxcStockInventoryItems(Map<String, Object> params) throws Exception;

    /**
     * 描述：根据inventory_sid分页获取goods_id
     */
    List<JxcStockInventoryItemExt> queryGoodsByInventoryIdByPage(Map<String, Object> params, PageBean page);

    /**
     * 描述：根据inventory_sid获取goods_id
     */
    List<JxcStockInventoryItemExt> queryGoodsByInventoryId(Map<String, Object> params);

    /**
     * 描述：保存或更新JxcStockInventoryItem
     *
     * @param record
     * @param opUser
     */
    void saveJxcStockInventoryDetail(JxcStockInventoryExt record, SysUser opUser) throws Exception;

    /**
     * 描述：盘点JxcStockInventoryItem
     *
     * @param record
     * @param opUser
     */
    void checkJxcStockInventoryItem(List<Map> record, SysUser opUser) throws Exception;

    /**
     * 描述：根据盘盈盘亏获取goods
     */
    List<JxcStockInventoryItemExt> selectGoodsBySurplus(String inventory_sid, List<String> record, PageBean page);
}